<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<body>
	<table class="layui-hide" id="dictionary" lay-filter="dictionary"></table>
	<script type="text/html" id="toolbarDemo">
		<div class="layui-btn-container">
			<button class="layui-btn layui-btn-sm" lay-event="add_panel">新增</button>
  		</div>
	</script>
	<script type="text/html" id="barDemo3">
  		<a class="layui-btn layui-btn-xs layui-btn-normal layui-icon layui-icon-set-fill" data-method="notice" lay-event="edit"> 查看信息</a>
       <button class="layui-btn layui-btn-sm" lay-event="update_panel2">修改</button>
	   <button class="layui-btn layui-btn-sm" lay-event="delete2">删除</button>
</script>
	<script type="text/javascript">
		var option={
			elem:'#dictionary',
			title:'数据字典',
			path:'dict/dictionary',
			addurl:'edit',
			toolbar:'#toolbarDemo',
			cols: [[
				{field: 'id', title: 'ID', hide: true, usersize: true, sort: true},
				{field: 'name', title: '字典名称'},
				{field: 'code', title: '字典代码'},
				{fixed: 'right', title: '操作', toolbar: '#barDemo3'}
			]] 
		}
		var currRow='${param.currRow==null?null:param.currRow}';
		var limit=${param.limit==null?'null':param.limit};
		var page=${param.page==null?'null':param.page};
		var classTable=new LayUiTable(option,currRow,limit,page);
		classTable.init();
		layui.use('table', function(){
			var table = layui.table;
			table.on('tool(dictionary)', function(obj){
			    var data = obj.data;
			    if(obj.event === 'edit'){
			    	layer.open({
			            type: 2,
			            title: '字典数据',
			            shadeClose: true,
	      				shade: false,
	      				maxmin: true,
			            area: ['893px', '600px'],
			            content: 'dict/systemdata/manage?uuid='+obj.data.id
			        });
			    }
			});
		});
		
	</script>
	
</body>
